package com.shiro.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface RolePermissionDao {
    @Insert("INSERT INTO `shirodemo`.`role_permission`(`id`, `rid`, `pid`, `creater`) VALUES (#{num},#{rid},#{pid}, 1)")
    int insertRolePermission(@Param("num")int num,@Param("rid")int rid, @Param("pid")int pid);

    @Select("Select max(id) from role_permission")
    int selectRolePermissionId();
}
